-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add options in base install #2
base: master
Are you sure you want to change the base?
Conversation
@@ -1,11 +0,0 @@ | |||
deployer ALL= NOPASSWD: /bin/systemctl start unicorn |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No lo borraría a eso, si vemos que el usuario está creado no lo metemos, caso contrario si.
base/install_app_base.sh
Outdated
dir_nginx=/etc/nginx | ||
|
||
echo "Instalación Paquete NGINX" | ||
#echo "Instalación Paquete NGINX" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Todos estos echo comentados, los pasaría a comentarios normales y en inglés.
base/install_app_base.sh
Outdated
while getopts u:p: option | ||
do | ||
case "${option}" in | ||
u) user=${OPTARG};; | ||
p) mawidabp_path=${OPTARG};; | ||
:) echo "INVALID";; | ||
\?) echo "Argumento -${option} erroneo use: | ||
[u] Nombre de usuario | ||
[p] Directorio de instalacion | ||
" | ||
exit;; | ||
|
||
esac | ||
done |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Esto se suele poner así:
while getopts u:p: option; do
case $option in
esac
done
Y el :) se le pone el mensaje "requiere un argumento". También se pone en eso dos casos un exit 1, así indicás error.
base/install_app_base.sh
Outdated
|
||
esac | ||
done | ||
shift $((OPTIND -1)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
¿Para qué hiciste esto?
base/install_app_base.sh
Outdated
#adduser deployer -G nginx | ||
#passwd deployer |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Acá haría lo que hablamos, todo esto en un if si no existe.
No description provided.